CentOS7和Ubuntu16.04 破解Linux文件数、进程数限制

修改limits.conf

1
2
3
4
5
6
7
vim /etc/security/limits.conf
添加如下内容

*(root) soft nofile 65536
* hard nofile 65536
* soft noproc 65536
* hard noproc 65536

执行命令

1
2
ulimit -n 65536
#sysctl -p #如不指定文件则默认/etc/sysctl.conf

查看是否生效

1
2
3
sysctl -a |grep ''
或者
ulimit -n

--------------------本文结束,感谢您的阅读--------------------

本文标题:CentOS7和Ubuntu16.04 破解Linux文件数、进程数限制

文章作者:弓昭

发布时间:2018年12月15日 - 20:22

最后更新:2020年04月08日 - 22:20

原始链接:https://gongzhao1.gitee.io/CentOS7和Ubuntu16.04 破解Linux文件数、进程数限制/

联系邮箱:gongzhao1@foxmail.com